<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }

        .wrap{
            width: 100vw;
        }
        .header, .footer{
            width: 100%;
            height: 50px;
            background-color: gray;
        }
        /* 弹性布局 */
        /* .content{
            height: 200px;
            display: flex;
        }
        .detail {
            flex:1;
        } */
        .content{
            /* height: 200px; */
            position: relative;
        }
        .detail{
            /* width: 100%; */
            height: 200px;
            margin: 0 200px;
            background-color: green;
        }
        .left ,.right{
            position: absolute;
            top: 0;
            width: 200px;
            height: 200px;
            background-color:pink;
        }
        
        .left{
            left: 0px;
        }
        .right{
            right: 0px;
        }
        
    </style>
</head>
<body>
    <div class="wrap">
        <div class="header"></div>
        <div class="container">
            <!-- 绝对定位 -->
            <div class="main">绝对定位</div>
            <div class="left">广告</div>
            <!-- 弹性布局 -->
            <!-- <div class="detail">弹性布局</div>   -->
            <div class="right">广告</div> 
        </div>
        <div class="footer"></div>
    </div>
</body>
</html>